cmake_minimum_required(VERSION 2.8)
# 工程名，不是执行文件名
PROJECT(knight-exe)
# 手动加入文件 
SET(SRC_LIST main.c)
MESSAGE(STATUS "THIS IS BINARY " ${PROJECT_BINARY_DIR})
MESSAGE(STATUS "THIS IS SOURCE " ${PROJECT_SOURCE_DIR})

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib")

link_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib")

# 添加库文件
add_executable(knight ${SRC_LIST})
# 默认链接动态库
# target_link_libraries(knight Dir1)


# 下面是静态链接
target_link_libraries(knight libDir1.a)